package com.wm.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wm.common.core.domain.BaseModel;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 待办任务实体类
 */

@Data
@TableName(value = "sys_mission")
public class SysMission extends BaseModel<SysMission> {

    /**
     * 单人处理完成
     */
    public static final String IS_SINGLE = "1";

    /**
     * 非单人处理完成
     */
    public static final String NOT_SINGLE = "0";

    /**
     * 已办
     */
    public static final String COMPLETED = "2";

    /**
     * 待办
     */
    public static final String NOT_COMPLETED = "1";

    @TableId(value = "student_id", type = IdType.AUTO)
    private Long id;

    /** 待办任务名称 */
    @TableField(value = "mission_name")
    private String missionName;

    /** 任务类型（字典） */
    @TableField(value = "mission_type")
    private String missionType;

    /** 接收用户id */
    @TableField(value = "receiver_id")
    private Long receiverId;

    /** 业务数据id */
    @TableField(value = "business_id")
    private Long businessId;

    /** 节点执行人名称 */
    @TableField(value = "executor")
    private String executor;

    /** 执行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "execute_time")
    private LocalDateTime executeTime;

    /** 节点，工作流为formKey，非工作流为32uuid */
    @TableField(value = "node")
    private String node;

    /** 是否单人处理即完成 0否 1是 */
    @TableField(value = "is_single")
    private String isSingle;

    /** 状态 1 待办 2已办 */
    @TableField(value = "status")
    private String status;
}
